# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kile
pkgver=2.9.93
pkgrel=2
# armhf blocked by extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by texlive
arch="all !armhf !ppc64le !s390x !riscv64"
url="https://kde.org/applications/office/org.kde.kile"
pkgdesc="A user-friendly TeX/LaTeX editor"
license="GPL-2.0-or-later"
depends="texlive"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kcoreaddons-dev
	kcrash-dev
	kdbusaddons-dev
	kdoctools-dev
	kguiaddons-dev
	khtml-dev
	ki18n-dev
	kiconthemes-dev
	kinit-dev
	kio-dev
	kparts-dev
	ktexteditor-dev
	kwindowsystem-dev
	kxmlgui-dev
	okular-dev
	poppler-qt5-dev
	qt5-qtbase-dev
	samurai
	"
source="https://downloads.sourceforge.net/kile/kile-$pkgver.tar.bz2"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="d87277b8ef16c82cfd415dd191916641fa1a25e316e1eb2c463b275d3654dcfe180bea03027589ab30cd8b769d92d97005846a78aff8058bcfb20eed76287504  kile-2.9.93.tar.bz2"
